/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.sd.entity;

import javax.validation.constraints.NotBlank;

import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.modules.sys.entity.Office;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.Date;

/**
 * sd_doc_destoy_recordEntity
 * @author ysj
 * @version 2020-08-10
 */
@Table(name="sd_doc_destoy_record", alias="a", columns={
		@Column(name="id", attrName="id", label="销毁记录Id", isPK=true),
		@Column(name="destoy_id", attrName="destoyId", label="销毁任务Id"),
		@Column(name="deliver_id", attrName="deliverId", label="文件记录Id"),
		@Column(name="recv_id", attrName="recvId", label="收文Id"),
	},
		joinTable = {
				@JoinTable(type = JoinTable.Type.LEFT_JOIN, entity = DocRecv.class, alias = "c", on = "c.id=a.recv_id",
						columns = {
								@Column(includeEntity = DocRecv.class),

						}),
				@JoinTable(type = JoinTable.Type.LEFT_JOIN,entity = DocDeliverRecord.class,alias = "d",on="a.deliver_id=d.id",
						columns = {
								@Column(includeEntity =DocDeliverRecord.class),

						}),
				@JoinTable(type = JoinTable.Type.LEFT_JOIN,entity = DocDestroyTask.class,alias = "do",on="a.destoy_id=do.id",
						columns = {
								@Column(includeEntity =DocDestroyTask.class),

						})

		},
		orderBy="a.id DESC"
)
public class DocDestoyRecord extends DataEntity<DocDestoyRecord> {
	
	private static final long serialVersionUID = 1L;
	private String destoyId;		// 销毁任务Id
	private String deliverId;		// 文件记录Id
	private String recvId;		// 收文Id
	private DocDeliverRecord docDeliverRecord;
	private DocRecv docRecv;
	private DocDestroyTask docDestroyTask;
	private String title;
	private String docNum;
	private String doCode;
	private String docCopyNo;

	public String getDocCopyNo() {
		return docCopyNo;
	}

	public void setDocCopyNo(String docCopyNo) {
		this.docCopyNo = docCopyNo;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDocNum() {
		return docNum;
	}

	public void setDocNum(String docNum) {
		this.docNum = docNum;
	}

	public String getDoCode() {
		return doCode;
	}

	public void setDoCode(String doCode) {
		this.doCode = doCode;
	}

	public DocDeliverRecord getDocDeliverRecord() {
		return docDeliverRecord;
	}

	public void setDocDeliverRecord(DocDeliverRecord docDeliverRecord) {
		this.docDeliverRecord = docDeliverRecord;
	}

	public DocRecv getDocRecv() {
		return docRecv;
	}

	public void setDocRecv(DocRecv docRecv) {
		this.docRecv = docRecv;
	}

	public DocDestroyTask getDocDestroyTask() {
		return docDestroyTask;
	}

	public void setDocDestroyTask(DocDestroyTask docDestroyTask) {
		this.docDestroyTask = docDestroyTask;
	}

	public DocDestoyRecord() {
		this(null);
	}

	public DocDestoyRecord(String id){
		super(id);
	}
	
	@NotBlank(message="销毁任务Id不能为空")
	@Length(min=0, max=64, message="销毁任务Id长度不能超过 64 个字符")
	public String getDestoyId() {
		return destoyId;
	}

	public void setDestoyId(String destoyId) {
		this.destoyId = destoyId;
	}
	
	@NotBlank(message="文件记录Id不能为空")
	@Length(min=0, max=64, message="文件记录Id长度不能超过 64 个字符")
	public String getDeliverId() {
		return deliverId;
	}

	public void setDeliverId(String deliverId) {
		this.deliverId = deliverId;
	}
	
	@NotBlank(message="收文Id不能为空")
	@Length(min=0, max=64, message="收文Id长度不能超过 64 个字符")
	public String getRecvId() {
		return recvId;
	}

	public void setRecvId(String recvId) {
		this.recvId = recvId;
	}
	
}